<?php


use Biz\service\SmallEnergy as sSmallEnergy;
/**
 * @deprecated
 * Created by PhpStorm.
 * User: Dave
 * Date: 2018/6/6
 * Time: 20:00
 */
class SetReadAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REGISTER;

    public function main()
    {

        $shopId = $this->getRequest()->getPost('shop_id', '');

        if (!$shopId) {
            throw new \Exception('商家id不能为空');
        }

        $result = sSmallEnergy::setRead($this->uid, $shopId);
        $data['is_success'] = $result ? 1 : 0;
        $this->setSuccess($data);

    }
}